package viewTest;

import java.awt.*;
import java.awt.event.*;
import java.io.File;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;

public class ViewComponent extends JComponent
{
	private Image image;
	public void setImage (File file)
	{
		image = Toolkit.getDefaultToolkit().getImage(file.getAbsolutePath());
		if (image != null)
			repaint();
	}
	
	protected void paintComponent (Graphics g)
	{
		if (image != null)
			g.drawImage (image,0,0,this);
	}

}
